package cn.mw.OpenFeign;

import cn.mw.OpenFeign.fallbackfactory.MenuFallbackFactory;
import cn.mw.domain.Menu;
import cn.mw.domain.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@Component
@FeignClient(value = "menu-server",fallbackFactory = MenuFallbackFactory.class)
public interface MenuFeign {
    @GetMapping("/Menu/getOne/{id}")
    Menu getOne(@PathVariable("id") Long id);
    //批量添加
    @PostMapping("/Menu/getAdd")
    void  getAdd(@RequestBody Menu menu);
}
